class Pwm:

    def __init__(self, framework):
        self.framework = framework
        self.command = {}

    def pwm_servo_motion(self, channel, rate, width):
        self.command = {"type": "pwm-servo-motion", "channel": channel, "rate": rate, "width": width}
        if self.framework.status:
            self.framework.write(self.command)

    def pwm_servo_multiple_motion(self, multiple, rate, width):
        self.command = {"type": "pwm-servo-multiple-motion", "multiple": multiple, "rate": rate, "width": width}
        if self.framework.status:
            self.framework.write(self.command)
